efi: Expose underlying UEFI firmware platform size to userland
authorSteve McIntyre <steve@einval.com>
Fri, 9 Jan 2015 15:29:53 +0000 (15:29 +0000)
committermaximilian attems <maks@debian.org>
Sat, 31 Jan 2015 21:20:40 +0000 (21:20 +0000)
commit6e9c09b38f6dfd947e0aa2b05998b0f5d53a8acc
tree65657c85dbee892fa5cf7a821741cf5b6cd97ce1
parentd27f8392a9921377eab1ee46d2cba2118b8a3fab
efi: Expose underlying UEFI firmware platform size to userland

In some cases (e.g. Intel Bay Trail machines), the kernel will happily
run in 64-bit even if the underlying UEFI firmware platform is
32-bit. That's great, but it's difficult for userland utilities like
grub-install to do the right thing in such a situation.

The kernel already knows about the size of the firmware via
efi_enabled(EFI_64BIT). Add an extra sysfs interface
/sys/firmware/efi/fw_platform_size to expose that information to
userland for low-level utilities to use.

Signed-off-by: Steve McIntyre <steve@einval.com>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Gbp-Pq: Topic features/all
Gbp-Pq: Name efi-expose-underlying-uefi-firmware-platform-size-to.patch
drivers/firmware/efi/efi.c